const state = {
  flowData: {
    nodeList: [],
    lineList: [],
  },
  data_etl_id: null,
  dragItem: {},
  currentItem: {},
};
const getters = {};
const mutations = {
  set_flowData: (state, set_flowData) => {
    state.flowData = set_flowData;
  },
  set_dragItem: (state, item) => {
    state.dragItem = item;
  },
  set_data_etl_id: (state, data_etl_id) => {
    state.data_etl_id = data_etl_id;
  },
  set_currentItem: (state, currentItem) => {
    state.currentItem = currentItem;
  },
  set_nodeList: (state, nodes) => {
    state.flowData.nodeList = nodes;
  },
  set_nodeList_add: (state, node) => {
    state.flowData.nodeList.push(node);
  },
  set_nodeList_reduce: (state, index) => {
    state.flowData.nodeList.splice(index, 1);
  },
  set_lineList: (state, nodes) => {
    state.flowData.lineList = nodes;
  },
  set_lineList_add: (state, node) => {
    state.flowData.lineList.push(node);
  },
  set_lineList_reduce: (state, index) => {
    state.flowData.lineList.splice(index, 1);
  },
};
const actions = {};
export default {
  namespaced: true,
  state,
  mutations,
  getters,
  actions
};
